﻿@model IEnumerable<StockPredictor.Models.UserPreferencesRecordModel>

 @Styles.Render("~/Content/Views.css")

@{
    ViewBag.Title = "My Preferences";
}

@{
     var count = Model.Count();
     
      if (Model.Count () < 1)
      {
         <p>
            @Html.ActionLink("Create Preferences", "Create")
        </p>
      }
     
     for(int i = 0; i < count; ++i)
     {      
        <h2>My Preference Information</h2>                                     
        <div class="CSSTableGenerator" >
        <table>
            <tr>
                <th>
                    EPS %
                </th>
                <th>
                    PE Ratio %
                </th>                           
               <th>
                    Notification Frequency
                </th>
               <th>
                    Include Stocks To Sell
                </th> 
               <th>
                    Include Stocks To Buy
                </th>
                 <th>                    
                </th>
             </tr>
   

    @foreach (var item in Model)
    {      
           <tr>
               <td>
                    @Html.DisplayFor(modelItem => item.EpsPrcntg)
                </td>
               
                <td>
                    @Html.DisplayFor(modelItem => item.PeRatioPrcntg)
                </td>
                         
                <td>
                    @Html.DisplayFor(modelItem => item.NotificationFrequency)
                </td>
                
                <td>
                    @Html.DisplayFor(modelItem => item.NotificationSendStocksToSell)
                </td>
                
                <td>
                    @Html.DisplayFor(modelItem => item.NotificationSendStocksToBuy)
                </td>
                <td>
                    @Html.ActionLink("Edit","Edit", new {id = item.PreferenceId })              
                </td>
               </tr>
        
    }
            </table>
    </div>
}
}